using C5;
using System;
using System.Collections;
using System.Collections.Generic;

namespace JSOCTNetSDK.XmppTask.Cron.Collection
{
	[System.Serializable]
	public class TreeSet<T> : C5.TreeSet<T>, ISortedSet<T>, ISet<T>, System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable
	{
		T ISortedSet<T>.this[int index]
		{
			get
			{
				return base[index];
			}
		}

		public TreeSet()
		{
		}

		public TreeSet(System.Collections.Generic.IComparer<T> comparer) : base(comparer)
		{
		}

		public TreeSet(System.Collections.Generic.IEnumerable<T> items)
		{
			base.AddAll<T>(items);
		}

		public T First()
		{
			if (this.Count <= 0)
			{
				return default(T);
			}
			return base[0];
		}

		public ISortedSet<T> TailSet(T limit)
		{
			TreeSet<T> treeSet = new TreeSet<T>(base.Comparer);
			IDirectedCollectionValue<T> items = base.RangeFrom(limit);
			treeSet.AddAll<T>(items);
			return treeSet;
		}
	}
	[System.Serializable]
	public class TreeSet : System.Collections.ArrayList
	{
	}
}
